home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 039a / dflat8.zip / DFLAT.H < prev    next >
Text File  |  1991-09-30  |  19KB  |  444 lines

  1. /* ------------- dflat.h ----------- */
  2. #ifndef DFLAT_H
  3. #define DFLAT_H
  4.  
  5. #include <stdio.h>
  6. #include <string.h>
  7. #include <stdlib.h>
  8. #include <dos.h>
  9. #include <process.h>
  10. #include <conio.h>
  11. #include <bios.h>
  12. #include <ctype.h>
  13. #include <io.h>
  14. #include <sys\types.h>
  15. #include <sys\stat.h>
  16. #include <time.h>
  17.  
  18. #define VERSION "Version 8"
  19.  
  20. #define TRUE 1
  21. #define FALSE 0
  22.  
  23. extern char DFlatApplication[];
  24.  
  25. #define MAXMESSAGES 50
  26. #define DELAYTICKS 1
  27. #define FIRSTDELAY 7
  28. #define DOUBLETICKS 5
  29.  
  30. #include "system.h"
  31. #include "config.h"
  32. #include "rect.h"
  33. #include "menu.h"
  34. #include "keys.h"
  35. #include "commands.h"
  36. #include "dialbox.h"
  37.  
  38. /* ------ integer type for message parameters ----- */
  39. typedef long PARAM;
  40.  
  41. typedef struct window {
  42.     CLASS class;           /* window class                  */
  43.     char *title;           /* window title                  */
  44.     struct window *parent; /* parent window                 */
  45.     int (*wndproc)
  46.         (struct window *, enum messages, PARAM, PARAM);
  47.     /* ----------------- window colors -------------------- */
  48.     char WindowColors[4][2];
  49.     /* ---------------- window dimensions ----------------- */
  50.     RECT rc;               /* window coordinates
  51.                                             (0/0 to 79/24)  */
  52.     int ht, wd;            /* window height and width       */
  53.     RECT RestoredRC;       /* restored condition rect       */
  54.     /* -------------- linked list pointers ---------------- */
  55.     struct window *nextfocus;   /* next window on screen    */
  56.     struct window *prevfocus;   /* previous window on screen*/
  57.     struct window *nextbuilt;   /* next window built        */
  58.     struct window *prevbuilt;   /* previous window built    */
  59.  
  60.     int attrib;                 /* Window attributes        */
  61.     char *videosave;            /* video save buffer        */
  62.     int condition;              /* Restored, Maximized,
  63.                                    Minimized, Closing       */
  64.     int oldcondition;           /* previous condition       */
  65.     int restored_attrib;        /* attributes when restored */
  66.     void *extension;      /* menus, dialogs, documents, etc */
  67.     struct window *PrevMouse;
  68.     struct window *PrevKeyboard;
  69.     struct window *MenuBarWnd;/* menu bar                   */
  70.     struct window *StatusBar; /* status bar                 */
  71.     /* ----------------- text box fields ------------------ */
  72.     int wlines;     /* number of lines of text              */
  73.     int wtop;       /* text line that is on the top display */
  74.     unsigned char *text; /* window text                     */
  75.     unsigned int textlen;  /* text length                   */
  76.     int wleft;      /* left position in window viewport     */
  77.     int textwidth;  /* width of longest line in textbox     */
  78.     int BlkBegLine; /* beginning line of marked block       */
  79.     int BlkBegCol;  /* beginning column of marked block     */
  80.     int BlkEndLine; /* ending line of marked block          */
  81.     int BlkEndCol;  /* ending column of marked block        */
  82.     int HScrollBox; /* position of horizontal scroll box    */
  83.     int VScrollBox; /* position of vertical scroll box      */
  84.     unsigned int *TextPointers; /* -> list of line offsets    */
  85.     /* ----------------- list box fields ------------------ */
  86.     int selection;  /* current selection                    */
  87.     int AddMode;    /* adding extended selections mode      */
  88.     int AnchorPoint;/* anchor point for extended selections */
  89.     int SelectCount;/* count of selected items              */
  90.     /* ----------------- edit box fields ------------------ */
  91.     int CurrCol;    /* Current column                       */
  92.     int CurrLine;   /* Current line                         */
  93.     int WndRow;     /* Current window row                   */
  94.     int TextChanged; /* TRUE if text has changed            */
  95.     unsigned char *DeletedText; /* for undo                 */
  96.     int DeletedLength; /* Length of deleted field           */
  97.     int InsertMode;    /* TRUE or FALSE for text insert     */
  98.     int WordWrapMode;  /* TRUE or FALSE for word wrap       */
  99.     /* ---------------- dialog box fields ----------------- */
  100.     void *dFocus;          /* control that has the focus    */
  101.     int ReturnCode;        /* return code from a dialog box */
  102.     int Modal;               /* True if a modeless dialog box */
  103.     CTLWINDOW *ct;           /* control structure             */
  104.     /* -------------- popdownmenu fields ------------------ */
  105.     MENU *mnu;        /* points to menu structure             */
  106.     MBAR *holdmenu; /* previous active menu                 */
  107.     /* --------------- help box fields -------------------- */
  108.     void *firstword; /* -> first in list of key words       */
  109.     void *lastword;  /* -> last in list of key words        */
  110.     void *thisword;  /* -> current in list of key words     */
  111.     /* -------------- status bar fields ------------------- */
  112.     int TimePosted;  /* True if time has been posted        */
  113.     /* ------------- picture box fields ------------------- */
  114.     int VectorCount;  /* number of vectors in vector list   */
  115.     void *VectorList; /* list of picture box vectors        */
  116. } * WINDOW;
  117.  
  118. #include "classdef.h"
  119. #include "video.h"
  120.  
  121. enum Condition     {
  122.     ISRESTORED, ISMINIMIZED, ISMAXIMIZED, ISCLOSING
  123. };
  124.  
  125. void LogMessages (WINDOW, MESSAGE, PARAM, PARAM);
  126. void MessageLog(WINDOW);
  127. /* ------- window methods ----------- */
  128. #define ICONHEIGHT 3
  129. #define ICONWIDTH  10
  130. #define WindowHeight(w)      ((w)->ht)
  131. #define WindowWidth(w)       ((w)->wd)
  132. #define BorderAdj(w)         (TestAttribute(w,HASBORDER)?1:0)
  133. #define BottomBorderAdj(w)   (TestAttribute(w,HASSTATUSBAR)?1:BorderAdj(w))
  134. #define TopBorderAdj(w)      ((TestAttribute(w,HASTITLEBAR) &&   \
  135.                               TestAttribute(w,HASMENUBAR)) ?  \
  136.                               2 : (TestAttribute(w,HASTITLEBAR | \
  137.                               HASMENUBAR | HASBORDER) ? 1 : 0))
  138. #define ClientWidth(w)       (WindowWidth(w)-BorderAdj(w)*2)
  139. #define ClientHeight(w)      (WindowHeight(w)-TopBorderAdj(w)-\
  140.                               BottomBorderAdj(w))
  141. #define WindowRect(w)        ((w)->rc)
  142. #define GetTop(w)            (RectTop(WindowRect(w)))
  143. #define GetBottom(w)         (RectBottom(WindowRect(w)))
  144. #define GetLeft(w)           (RectLeft(WindowRect(w)))
  145. #define GetRight(w)          (RectRight(WindowRect(w)))
  146. #define GetClientTop(w)      (GetTop(w)+TopBorderAdj(w))
  147. #define GetClientBottom(w)   (GetBottom(w)-BottomBorderAdj(w))
  148. #define GetClientLeft(w)     (GetLeft(w)+BorderAdj(w))
  149. #define GetClientRight(w)    (GetRight(w)-BorderAdj(w))
  150. #define GetParent(w)         ((w)->parent)
  151. #define GetTitle(w)          ((w)->title)
  152. #define NextWindow(w)        ((w)->nextfocus)
  153. #define PrevWindow(w)        ((w)->prevfocus)
  154. #define NextWindowBuilt(w)   ((w)->nextbuilt)
  155. #define PrevWindowBuilt(w)   ((w)->prevbuilt)
  156. #define GetClass(w)          ((w)->class)
  157. #define GetAttribute(w)      ((w)->attrib)
  158. #define AddAttribute(w,a)    (GetAttribute(w) |= a)
  159. #define ClearAttribute(w,a)  (GetAttribute(w) &= ~(a))
  160. #define TestAttribute(w,a)   (GetAttribute(w) & (a))
  161. #define isWndVisible(w)      (GetAttribute(w) & VISIBLE)
  162. #define SetVisible(w)        (GetAttribute(w) |= VISIBLE)
  163. #define ClearVisible(w)      (GetAttribute(w) &= ~VISIBLE)
  164. #define gotoxy(w,x,y) cursor(w->rc.lf+(x)+1,w->rc.tp+(y)+1)
  165. int isVisible(WINDOW);
  166. WINDOW CreateWindow(CLASS,char *,int,int,int,int,void*,WINDOW,
  167.        int (*)(struct window *,enum messages,PARAM,PARAM),int);
  168. void AddTitle(WINDOW, char *);
  169. void InsertTitle(WINDOW, char *);
  170. void DisplayTitle(WINDOW, RECT *);
  171. void RepaintBorder(WINDOW, RECT *);
  172. void ClearWindow(WINDOW, RECT *, int);
  173. void writeline(WINDOW, char *, int, int, int);
  174. void InitWindowColors(WINDOW);
  175.  
  176. void SetNextFocus(WINDOW);
  177. void SetPrevFocus(WINDOW);
  178. void SkipSystemWindows(int);
  179. void RemoveFocusWindow(WINDOW);
  180. void AppendFocusWindow(WINDOW);
  181. void PrependFocusWindow(WINDOW);
  182. void RemoveBuiltWindow(WINDOW);
  183. void AppendBuiltWindow(WINDOW);
  184. WINDOW GetFirstChild(WINDOW);
  185. WINDOW GetNextChild(WINDOW, WINDOW);
  186. WINDOW GetLastChild(WINDOW);
  187. WINDOW GetPrevChild(WINDOW, WINDOW);
  188. WINDOW GetFirstFocusChild(WINDOW);
  189. WINDOW GetNextFocusChild(WINDOW, WINDOW);
  190.  
  191. int CharInView(WINDOW, int, int);
  192. void GetVideoBuffer(WINDOW);
  193. void RestoreVideoBuffer(WINDOW);
  194. void CreatePath(char *, char *, int, int);
  195. int LineLength(char *);
  196. RECT AdjustRectangle(WINDOW, RECT);
  197. int isDerivedFrom(WINDOW, CLASS);
  198. WINDOW GetAncestor(WINDOW);
  199. void PutWindowChar(WINDOW,int,int,int);
  200. void PutWindowLine(WINDOW, void *, int, int);
  201. #define BaseWndProc(class,wnd,msg,p1,p2)    \
  202.     (*classdefs[(classdefs[class].base)].wndproc)(wnd,msg,p1,p2)
  203. #define DefaultWndProc(wnd,msg,p1,p2)         \
  204.     (classdefs[wnd->class].wndproc == NULL) ? \
  205.     BaseWndProc(wnd->class,wnd,msg,p1,p2) :      \
  206.     (*classdefs[wnd->class].wndproc)(wnd,msg,p1,p2)
  207. struct LinkedList    {
  208.     WINDOW FirstWindow;
  209.     WINDOW LastWindow;
  210. };
  211. extern struct LinkedList Focus;
  212. extern struct LinkedList Built;
  213. extern WINDOW inFocus;
  214. extern WINDOW CaptureMouse;
  215. extern WINDOW CaptureKeyboard;
  216. extern int foreground, background;
  217. extern int WindowMoving;
  218. extern int WindowSizing;
  219. extern int TextMarking;
  220. extern int VSliding;
  221. extern int HSliding;
  222. extern char *Clipboard;
  223. extern int ClipboardLength;
  224. extern int VSliding;
  225. extern int HSliding;
  226. /* --------- space between menubar labels --------- */
  227. #define MSPACE 2
  228. /* --------------- border characters ------------- */
  229. #define FOCUS_NW      (unsigned char) '\xc9'
  230. #define FOCUS_NE      (unsigned char) '\xbb'
  231. #define FOCUS_SE      (unsigned char) '\xbc'
  232. #define FOCUS_SW      (unsigned char) '\xc8'
  233. #define FOCUS_SIDE    (unsigned char) '\xba'
  234. #define FOCUS_LINE    (unsigned char) '\xcd'
  235. #define NW            (unsigned char) '\xda'
  236. #define NE            (unsigned char) '\xbf'
  237. #define SE            (unsigned char) '\xd9'
  238. #define SW            (unsigned char) '\xc0'
  239. #define SIDE          (unsigned char) '\xb3'
  240. #define LINE          (unsigned char) '\xc4'
  241. #define LEDGE         (unsigned char) '\xc3'
  242. #define REDGE         (unsigned char) '\xb4'
  243. /* ------------- scroll bar characters ------------ */
  244. #define UPSCROLLBOX    (unsigned char) '\x1e'
  245. #define DOWNSCROLLBOX  (unsigned char) '\x1f'
  246. #define LEFTSCROLLBOX  (unsigned char) '\x11'
  247. #define RIGHTSCROLLBOX (unsigned char) '\x10'
  248. #define SCROLLBARCHAR  (unsigned char) 176 
  249. #define SCROLLBOXCHAR  (unsigned char) 178
  250. /* ------------------ menu characters --------------------- */
  251. #define CHECKMARK      (unsigned char) (SCREENHEIGHT==25?251:4)
  252. #define CASCADEPOINTER (unsigned char) '\x10'
  253. /* ----------------- title bar characters ----------------- */
  254. #define CONTROLBOXCHAR (unsigned char) '\xf0'
  255. #define MAXPOINTER     24      /* maximize token            */
  256. #define MINPOINTER     25      /* minimize token            */
  257. #define RESTOREPOINTER 18      /* restore token             */
  258. /* --------------- text control characters ---------------- */
  259. #define APPLCHAR     (unsigned char) 176 /* fills application window */
  260. #define SHORTCUTCHAR '~'    /* prefix: shortcut key display */
  261. #define CHANGECOLOR  (unsigned char) 174 /* prefix to change colors  */
  262. #define RESETCOLOR   (unsigned char) 175 /* reset colors to default  */
  263. #define LISTSELECTOR   4    /* selected list box entry      */
  264. /* --------- message prototypes ----------- */
  265. void init_messages(void);
  266. void PostMessage(WINDOW, MESSAGE, PARAM, PARAM);
  267. int SendMessage(WINDOW, MESSAGE, PARAM, PARAM);
  268. int dispatch_message(void);
  269. int TestCriticalError(void);
  270. /* ---- standard window message processing prototypes ----- */
  271. int ApplicationProc(WINDOW, MESSAGE, PARAM, PARAM);
  272. int NormalProc(WINDOW, MESSAGE, PARAM, PARAM);
  273. int TextBoxProc(WINDOW, MESSAGE, PARAM, PARAM);
  274. int ListBoxProc(WINDOW, MESSAGE, PARAM, PARAM);
  275. int EditBoxProc(WINDOW, MESSAGE, PARAM, PARAM);
  276. int PictureProc(WINDOW, MESSAGE, PARAM, PARAM);
  277. int MenuBarProc(WINDOW, MESSAGE, PARAM, PARAM);
  278. int PopDownProc(WINDOW, MESSAGE, PARAM, PARAM);
  279. int ButtonProc(WINDOW, MESSAGE, PARAM, PARAM);
  280. int ComboProc(WINDOW, MESSAGE, PARAM, PARAM);
  281. int TextProc(WINDOW, MESSAGE, PARAM, PARAM);
  282. int RadioButtonProc(WINDOW, MESSAGE, PARAM, PARAM);
  283. int CheckBoxProc(WINDOW, MESSAGE, PARAM, PARAM);
  284. int SpinButtonProc(WINDOW, MESSAGE, PARAM, PARAM);
  285. int BoxProc(WINDOW, MESSAGE, PARAM, PARAM);
  286. int DialogProc(WINDOW, MESSAGE, PARAM, PARAM);
  287. int SystemMenuProc(WINDOW, MESSAGE, PARAM, PARAM);
  288. int HelpBoxProc(WINDOW, MESSAGE, PARAM, PARAM);
  289. int MessageBoxProc(WINDOW, MESSAGE, PARAM, PARAM);
  290. int CancelBoxProc(WINDOW, MESSAGE, PARAM, PARAM);
  291. int ErrorBoxProc(WINDOW, MESSAGE, PARAM, PARAM);
  292. int YesNoBoxProc(WINDOW, MESSAGE, PARAM, PARAM);
  293. int StatusBarProc(WINDOW, MESSAGE, PARAM, PARAM);
  294. /* ------------- normal box prototypes ------------- */
  295. int isWindow(WINDOW);
  296. WINDOW inWindow(int, int);
  297. void SetStandardColor(WINDOW);
  298. void SetReverseColor(WINDOW);
  299. #define HitControlBox(wnd, p1, p2)     \
  300.      (TestAttribute(wnd, CONTROLBOX) && \
  301.      p1 == 2 && p2 == 0)
  302. #define WndForeground(wnd)         \
  303.     (wnd->WindowColors [STD_COLOR] [FG])
  304. #define WndBackground(wnd)         \
  305.     (wnd->WindowColors [STD_COLOR] [BG])
  306. #define FrameForeground(wnd)     \
  307.     (wnd->WindowColors [FRAME_COLOR] [FG])
  308. #define FrameBackground(wnd)     \
  309.     (wnd->WindowColors [FRAME_COLOR] [BG])
  310. #define SelectForeground(wnd)     \
  311.     (wnd->WindowColors [SELECT_COLOR] [FG])
  312. #define SelectBackground(wnd)     \
  313.     (wnd->WindowColors [SELECT_COLOR] [BG])
  314. #define HighlightForeground(wnd)     \
  315.     (wnd->WindowColors [HILITE_COLOR] [FG])
  316. #define HighlightBackground(wnd)     \
  317.     (wnd->WindowColors [HILITE_COLOR] [BG])
  318. #define WindowClientColor(wnd, fg, bg)     \
  319.         WndForeground(wnd) = fg, WndBackground(wnd) = bg
  320. #define WindowReverseColor(wnd, fg, bg) \
  321.         SelectForeground(wnd) = fg, SelectBackground(wnd) = bg
  322. #define WindowFrameColor(wnd, fg, bg) \
  323.         FrameForeground(wnd) = fg, FrameBackground(wnd) = bg
  324. #define WindowHighlightColor(wnd, fg, bg) \
  325.         HighlightForeground(wnd) = fg, HighlightBackground(wnd) = bg
  326. /* -------- text box prototypes ---------- */
  327. #define TextLine(wnd, sel) \
  328.       (wnd->text + *((wnd->TextPointers) + sel))
  329. void WriteTextLine(WINDOW, RECT *, int, int);
  330. void SetAnchor(WINDOW, int, int);
  331. #define TextBlockMarked(wnd) (  wnd->BlkBegLine ||    \
  332.                                 wnd->BlkEndLine ||    \
  333.                                 wnd->BlkBegCol  ||    \
  334.                                 wnd->BlkEndCol)
  335. void MarkTextBlock(WINDOW, int, int, int, int);
  336. #define ClearTextBlock(wnd) wnd->BlkBegLine = wnd->BlkEndLine =  \
  337.                         wnd->BlkBegCol  = wnd->BlkEndCol = 0;
  338. #define GetText(w)        ((w)->text)
  339. void ClearTextPointers(WINDOW);
  340. void BuildTextPointers(WINDOW);
  341. int TextLineNumber(WINDOW, char *);
  342. void CopyToClipboard(WINDOW);
  343. #define PasteFromClipboard(wnd) PasteText(wnd,Clipboard,ClipboardLength)
  344. void PasteText(WINDOW, char *, int);
  345. /* --------- menu prototypes ---------- */
  346. int CopyCommand(unsigned char *, unsigned char *, int, int);
  347. void PrepFileMenu(void *, struct Menu *);
  348. void PrepEditMenu(void *, struct Menu *);
  349. void PrepSearchMenu(void *, struct Menu *);
  350. void PrepWindowMenu(void *, struct Menu *);
  351. void BuildSystemMenu(WINDOW);
  352. int isActive(MBAR *, int);
  353. char *GetCommandText(MBAR *, int);
  354. int isCascadedCommand(MBAR *,int);
  355. void ActivateCommand(MBAR *,int);
  356. void DeactivateCommand(MBAR *,int);
  357. int GetCommandToggle(MBAR *,int);
  358. void SetCommandToggle(MBAR *,int);
  359. void ClearCommandToggle(MBAR *,int);
  360. void InvertCommandToggle(MBAR *,int);
  361. int BarSelection(int);
  362. /* ------------- list box prototypes -------------- */
  363. int ItemSelected(WINDOW, int);
  364. /* ------------- edit box prototypes ----------- */
  365. #define CurrChar (TextLine(wnd, wnd->CurrLine)+wnd->CurrCol)
  366. #define WndCol   (wnd->CurrCol-wnd->wleft)
  367. #define isMultiLine(wnd)     TestAttribute(wnd, MULTILINE)
  368. void SearchText(WINDOW);
  369. void ReplaceText(WINDOW);
  370. void SearchNext(WINDOW);
  371. /* --------- message box prototypes -------- */
  372. int GenericMessage(WINDOW, char *, char *, int,
  373.     int (*)(struct window *, enum messages, PARAM, PARAM),
  374.     char *, char *, int, int, int);
  375. #define TestErrorMessage(msg)    \
  376.     GenericMessage(NULL, "Error", msg, 2, ErrorBoxProc,      \
  377.         Ok, Cancel, ID_OK, ID_CANCEL, TRUE)
  378. #define ErrorMessage(msg) \
  379.     GenericMessage(NULL, "Error", msg, 1, ErrorBoxProc,   \
  380.         Ok, NULL, ID_OK, 0, TRUE)
  381. #define MessageBox(ttl, msg) \
  382.     GenericMessage(NULL, ttl,     msg, 1, MessageBoxProc, \
  383.         Ok, NULL, ID_OK, 0, TRUE)
  384. #define YesNoBox(msg)    \
  385.     GenericMessage(NULL, NULL,    msg, 2, YesNoBoxProc,   \
  386.         Yes, No, ID_OK, ID_CANCEL, TRUE)
  387. #define CancelBox(wnd, msg) \
  388.     GenericMessage(wnd, "Wait...", msg, 1, CancelBoxProc, \
  389.         Cancel, NULL, ID_CANCEL, 0, FALSE)
  390. void CloseCancelBox(void);
  391. WINDOW MomentaryMessage(char *);
  392. int MsgHeight(char *);
  393. int MsgWidth(char *);
  394.  
  395. /* ------------- dialog box prototypes -------------- */
  396. int DialogBox(WINDOW, DBOX *, int,
  397.        int (*)(struct window *, enum messages, PARAM, PARAM));
  398. int OpenFileDialogBox(char *, char *);
  399. int SaveAsDialogBox(char *);
  400. void GetDlgListText(WINDOW, char *, enum commands);
  401. int DlgDirList(WINDOW, char *, enum commands,
  402.                             enum commands, unsigned);
  403. int RadioButtonSetting(DBOX *, enum commands);
  404. void PushRadioButton(DBOX *, enum commands);
  405. void PutItemText(WINDOW, enum commands, char *);
  406. void PutComboListText(WINDOW, enum commands, char *);
  407. void GetItemText(WINDOW, enum commands, char *, int);
  408. char *GetDlgTextString(DBOX *, enum commands, CLASS);
  409. void SetDlgTextString(DBOX *, enum commands, char *, CLASS);
  410. void SetCheckBox(DBOX *, enum commands);
  411. void ClearCheckBox(DBOX *, enum commands);
  412. int CheckBoxSetting(DBOX *, enum commands);
  413. CTLWINDOW *FindCommand(DBOX *, enum commands, int);
  414. WINDOW ControlWindow(DBOX *, enum commands);
  415. void EnableButton(DBOX *, enum commands);
  416. void DisableButton(DBOX *, enum commands);
  417. #define GetControl(wnd) (wnd->ct)
  418.  
  419. #define GetDlgText(db, cmd) GetDlgTextString(db, cmd, TEXT)
  420. #define GetDlgTextBox(db, cmd) GetDlgTextString(db, cmd, TEXTBOX)
  421. #define GetEditBoxText(db, cmd) GetDlgTextString(db, cmd, EDITBOX)
  422. #define GetComboBoxText(db, cmd) GetDlgTextString(db, cmd, COMBOBOX)
  423. #define SetDlgText(db, cmd, s) SetDlgTextString(db, cmd, s, TEXT)
  424. #define SetDlgTextBox(db, cmd, s) SetDlgTextString(db, cmd, s, TEXTBOX)
  425. #define SetEditBoxText(db, cmd, s) SetDlgTextString(db, cmd, s, EDITBOX)
  426. #define SetComboBoxText(db, cmd, s) SetDlgTextString(db, cmd, s, COMBOBOX)
  427.  
  428. /* ---- types of vectors that can be in a picture box ------- */
  429. enum VectTypes {VECTOR, SOLIDBAR, HEAVYBAR, CROSSBAR, LIGHTBAR};
  430.  
  431. /* ------------- picture box prototypes ------------- */
  432. void DrawVector(WINDOW, int, int, int, int);
  433. void DrawBox(WINDOW, int, int, int, int);
  434. void DrawBar(WINDOW, enum VectTypes, int, int, int, int);
  435.  
  436. /* ------------- help box prototypes ------------- */
  437. void LoadHelpFile(void);
  438. void UnLoadHelpFile(void);
  439. int DisplayHelp(WINDOW, char *);
  440.  
  441. extern char *ClassNames[];
  442.  
  443. #endif
  444.